package ATM.gui;

import javax.swing.JPanel;
import java.awt.GridBagLayout;
import javax.swing.JLabel;
import java.awt.GridBagConstraints;
import java.awt.Insets;
import javax.swing.JTextField;
import javax.swing.JButton;

public class NewCustomer extends JPanel {
	private Screen screen;
	private JTextField tfldFirstName;
	private JTextField tfldLastName;
	private JTextField tfldCpr;
	private JTextField tfldAddress;
	private JTextField tfldZipCode;
	private JTextField tfldCity;
	private JTextField tfldCountry;
	private JTextField tfldNumber;
	private JTextField tfldMail;

	/**
	 * Create the panel.
	 */
	public NewCustomer(Screen screen) {
		this.screen = screen;
		setLayout(null);
		
		JLabel lblNewCustomer = new JLabel("New Customer");
		lblNewCustomer.setBounds(10, 75, 90, 14);
		add(lblNewCustomer);
		
		JLabel lblFirstName = new JLabel("First name");
		lblFirstName.setBounds(10, 120, 90, 20);
		add(lblFirstName);
		
		tfldFirstName = new JTextField();
		tfldFirstName.setBounds(105, 120, 200, 20);
		add(tfldFirstName);
		tfldFirstName.setColumns(10);
		
		JLabel lblTelefonNr = new JLabel("Phone number");
		lblTelefonNr.setBounds(10, 322, 94, 14);
		add(lblTelefonNr);
		
		tfldNumber = new JTextField();
		tfldNumber.setBounds(109, 319, 200, 20);
		add(tfldNumber);
		tfldNumber.setColumns(10);
		
		JLabel lblLastName = new JLabel("Last name");
		lblLastName.setBounds(315, 123, 90, 14);
		add(lblLastName);
		
		tfldLastName = new JTextField();
		tfldLastName.setBounds(410, 120, 200, 20);
		add(tfldLastName);
		tfldLastName.setColumns(10);
		
		JLabel lblEmail = new JLabel("E-mail");
		lblEmail.setBounds(10, 347, 94, 14);
		add(lblEmail);
		
		tfldMail = new JTextField();
		tfldMail.setBounds(109, 344, 200, 20);
		add(tfldMail);
		tfldMail.setColumns(10);
		
		JLabel lblCpr = new JLabel("CPR");
		lblCpr.setBounds(10, 154, 90, 14);
		add(lblCpr);
		
		tfldCpr = new JTextField();
		tfldCpr.setBounds(105, 151, 200, 20);
		add(tfldCpr);
		tfldCpr.setColumns(10);
		
		JLabel lblNewLabel = new JLabel("Address");
		lblNewLabel.setBounds(10, 215, 90, 14);
		add(lblNewLabel);
		
		tfldAddress = new JTextField();
		tfldAddress.setBounds(105, 212, 200, 20);
		add(tfldAddress);
		tfldAddress.setColumns(10);
		
		JLabel lblNewLabel_1 = new JLabel("Zip code");
		lblNewLabel_1.setBounds(10, 240, 90, 14);
		add(lblNewLabel_1);
		
		tfldZipCode = new JTextField();
		tfldZipCode.setBounds(105, 237, 200, 20);
		add(tfldZipCode);
		tfldZipCode.setColumns(10);
		
		JLabel lblNewLabel_2 = new JLabel("City ");
		lblNewLabel_2.setBounds(315, 240, 90, 14);
		add(lblNewLabel_2);
		
		tfldCity = new JTextField();
		tfldCity.setBounds(410, 237, 200, 20);
		add(tfldCity);
		tfldCity.setColumns(10);
		
		JLabel lblCountry = new JLabel("Country");
		lblCountry.setBounds(10, 268, 90, 14);
		add(lblCountry);
		
		tfldCountry = new JTextField();
		tfldCountry.setBounds(105, 265, 200, 20);
		add(tfldCountry);
		tfldCountry.setColumns(10);
		
		JButton btnFinish = new JButton("Finish");
		btnFinish.setBounds(483, 350, 130, 23);
		add(btnFinish);
		btnFinish.setActionCommand("NewCustomerFinish");
		btnFinish.addActionListener(screen.getAdminaL());
		
		JButton btnExit = new JButton("Menu");
		btnExit.setBounds(483, 375, 130, 23);
		add(btnExit);
		btnExit.setActionCommand("MenuAdmin");
		btnExit.addActionListener(screen.getAdminaL());
		
		JLabel image = (new JLabel(screen.getVariables().getImage1() ));
		image.setBounds(0, 0, 640, 480);
		add(image);

	}

	public Screen getScreen() {
		return screen;
	}

	public void setScreen(Screen screen) {
		this.screen = screen;
	}

	public JTextField getTfldNumber() {
		return tfldNumber;
	}

	public void setTfldNumber(JTextField tfldNumber) {
		this.tfldNumber = tfldNumber;
	}

	public JTextField getTfldFirstName() {
		return tfldFirstName;
	}

	public void setTfldFirstName(JTextField tfldFirstName) {
		this.tfldFirstName = tfldFirstName;
	}

	public JTextField getTfldLastName() {
		return tfldLastName;
	}

	public void setTfldLastName(JTextField tfldLastName) {
		this.tfldLastName = tfldLastName;
	}

	public JTextField getTfldCpr() {
		return tfldCpr;
	}

	public void setTfldCpr(JTextField tfldCpr) {
		this.tfldCpr = tfldCpr;
	}

	public JTextField getTfldAddress() {
		return tfldAddress;
	}

	public void setTfldAddress(JTextField tfldAddress) {
		this.tfldAddress = tfldAddress;
	}

	public JTextField getTfldZipCode() {
		return tfldZipCode;
	}

	public void setTfldZipCode(JTextField tfldZipCode) {
		this.tfldZipCode = tfldZipCode;
	}

	public JTextField getTfldCity() {
		return tfldCity;
	}

	public void setTfldCity(JTextField tfldCity) {
		this.tfldCity = tfldCity;
	}

	public JTextField getTfldCountry() {
		return tfldCountry;
	}

	public void setTfldCountry(JTextField tfldCountry) {
		this.tfldCountry = tfldCountry;
	}

	public JTextField getTfldMail() {
		return tfldMail;
	}

	public void setTfldMail(JTextField tfldMail) {
		this.tfldMail = tfldMail;
	}
	
	

}
